<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.23.
   家居公司积分记录模型($$)*/

!defined('Q_PATH') && exit;

class JiajucreditlogModel extends CommonModel{

	static public function init__(){
		return array(
			'table_name'=>'jiajucreditlog',
			'autofill'=>array(
				array('user_id','userId','create','callback'),
				array('jiajucreditlog_username','userName','create','callback'),
			),
			'check'=>array(
				'jiajucreditlog_module'=>array(
					array('max_length',20,Q::L('积分的模块不能超过20个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucreditlog_tips'=>array(
					array('max_length',250,Q::L('积分提示不能超过250个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucreditlog_username'=>array(
					array('max_length',50,Q::L('触发人用户名不能超过50个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
			),
		);
	}

	static function F(){
		$arrArgs=func_get_args();
		return ModelMeta::instance(__CLASS__)->findByArgs($arrArgs);
	}

	static function M(){
		return ModelMeta::instance(__CLASS__);
	}

	protected function beforeSave_(){
		$this->jiajucreditlog_module=C::text($this->jiajucreditlog_module);
		$this->jiajucreditlog_tips=C::strip($this->jiajucreditlog_tips);
		$this->jiajucreditlog_username=C::text($this->jiajucreditlog_username);
	}

}
